#include <iostream>
#include <boost/smart_ptr/shared_ptr.hpp>
#include "agent.h"
#include "frame.h"
#include "thread.h"
#include "agentBase.h"

Agent::Agent(std::string const& agentName)
	: HttpReceiver(agentName)
{
	acceptSubUrl("GET", ".jpg");
	acceptSubUrl("POST", "/");
}

void Agent::receiveBlock(com::Block const& block)
{
	if(block.has_frontengineheartbeat())
	{
//		std::cout << "frontengineheartbeat" << std::endl;
	}
	else
	{
		std::cout << "yes agent got Data=" << " len=" << block.flowpacket().payload().size() << std::endl;
	}
}
